package net.qhzw.vip.qiyu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import net.qhzw.vip.qiyu.entity.RepairMaint;
import net.qhzw.vip.qiyu.model.CarRentalRepairMaint;
import net.qhzw.vip.qiyu.model.CarRetreatMaintVo;

import java.math.BigDecimal;
import java.util.List;

public interface RepairMaintService extends IService<RepairMaint> {


    Page<RepairMaint> findByPage(Page<RepairMaint> page, RepairMaint repairMaint, Long shopId);


    boolean addRepairMaint(RepairMaint repairMaint);


    boolean updateRepairMaint(RepairMaint repairMaint);

    /***
     * 根据退车申请表id查询 配件价格 名称
     * @param idList
     * @return
     */
    List<CarRetreatMaintVo> findByRetreatIds(List<Long> idList);

    /***
     * 查询配件价格
     * @param idList
     * @return
     */
    List<RepairMaint> getRepairMaintByRetreatId(List<Long> idList);


    /**
     * 根据换车申请id查询配件列表
     * @param id
     * @return
     */
    List<RepairMaint> listByTransferId(Long id);

    /***
     * 根据租车ID查询维修费
     * @param list
     * @return
     */
    List<CarRentalRepairMaint> listByCarRetreatIds(List<Long> list);


    /***
     * 根据退车id查询维修费
     * @param id
     * @return
     */
    BigDecimal getPriceByRetreatId(Long id);
}
